<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='老人管理-列表',jsPaths='/static/plugins/jquery-ui.min.js,/static/js/elder/elderly/elist.js',cssPaths='/static/css/jquery-ui.min.css,/static/css/elder/elderly/elist.css')">
<div class="right" th:fragment="right">
    <style>
        .ui-menu { width: 79px;}
    </style>
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                    <span class="layui-breadcrumb" lay-separator=">">
                        <a th:href="@{/}">首页</a>
                        <a href="/gbElderly/elist">老人管理</a>
                        <a><cite>列表</cite></a>
                    </span>
    </div>

    <!--以下就是右键demo2后弹出的菜单项-->
    <ul id="menu" style="display: none;position: fixed;z-index: 1" >
        <li><a href="#" class="message">基本信息</a></li>
        <li><a href="#" class="record">健康档案</a></li>
        <li><a href="#" class="service ">服务记录</a></li>
        <li><a href="#" class="checkInUpdate ">入住变更</a></li>
        <li><a href="#" class="checkOut ">&#8194;退&#8195;院&#8194;</a></li>
    </ul>


    <!--主体内容区-->
    <div class="page-content">
        <div class="search-box">
            <table class="layui-table">
                <tbody>
                <tr>
                    <td th:if="${buildings == 0}">
                        <a href="/building" class="layui-btn layui-btn-danger" th:text="创建楼宇"></a>
                    </td>
                    <td th:if="${buildings != 0}" id="buids">
                        <a th:each="b,iterStat:${buildings}" href="javascript:void(0)" class="layui-btn buildBtn"
                           th:attr="data-bid=${b.id}"
                           th:classappend="${ iterStat.index!=0 ? 'layui-btn-primary' :'active'}"
                           th:text="${b.name}"> </a>
                    </td>
                </tr>
                <tr>
                    <td th:if="${bedsBuild == 0}">
                                    <span>
                                        <span style="margin-right: 30px; font-size: 16px;">总床位数:<span
                                                id="buidBedNum0">0</span></span>
                                        <span style="margin-right: 30px; font-size: 16px;">入住人数:<span
                                                id="buidBedNum1">0</span></span>
                                        <span style="margin-right: 30px; font-size: 16px;">空闲床位:<span
                                                id="buidBedNum2">0</span></span>
                                    </span>
                    </td>
                    <td th:if="${bedsBuild != 0}">
                                    <span th:each="bb,ind:${bedsBuild}">
                                        <span th:if="${ind.index==0}" style="margin-right: 30px; font-size: 16px;">总床位数:<span
                                                id="buidBedNum0" th:if="${ind.index==0}" th:text="${bb.floor}">0</span></span>
                                        <span th:if="${ind.index==1}" style="margin-right: 30px; font-size: 16px;">入住人数:<span
                                                id="buidBedNum1" th:if="${ind.index==1}" th:text="${bb.floor}">0</span></span>
                                        <span th:if="${ind.index==2}" style="margin-right: 30px; font-size: 16px;">空闲床位:<span
                                                id="buidBedNum2" th:if="${ind.index==2}" th:text="${bb.floor}">0</span></span>
                                    </span>
                        <div class="layui-input-inline" style="margin-left: 100px;">
                            <label class="layui-form-label">老人姓名</label>
                            <div class="layui-input-inline">
                                <input type="text" id="elderlyName" readonly placeholder="请点击选择老人查询" autocomplete="off"
                                       class="layui-input">
                                <input type="hidden" id="elderlyId">
                            </div>
                        </div>
                    </td>
                </tr>
                <tr id="floorList">
                    <td th:if="${floorList == 0}">
                        <a href="/room" class="layui-btn layui-btn-danger" th:text="创建房间" th:value="f"></a>
                    </td>
                    <td th:if="${floorList !=0}" id="floors">
                        <a th:each="f,iterStat:${floorList}" href="javascript:void(0)" th:attr="data-floor=${f}"
                           class="layui-btn floorBtn"
                           th:classappend="${ iterStat.index!=0 ? 'layui-btn-primary' :'active'}"
                           th:text="${f}+'层'"></a>
                    </td>
                </tr>
                <tr>
                    <td th:if="${bedsFloor == 0}">
                                    <span>
                                        <span style="margin-right: 30px; font-size: 16px;">总床位数:<span
                                                id="buidBedNum0">0</span></span>
                                        <span style="margin-right: 30px; font-size: 16px;">入住人数:<span
                                                id="buidBedNum1">0</span></span>
                                        <span style="margin-right: 30px; font-size: 16px;">空闲床位:<span
                                                id="buidBedNum2">0</span></span>
                                    </span>
                    </td>
                    <td th:if="${bedsFloor != 0}">
                                      <span th:each="bb,ind:${bedsFloor}">
                                         <span th:if="${ind.index==0}" style="margin-right: 30px; font-size: 16px;">总床位数:<span
                                                 id="floorBedNum0" th:if="${ind.index==0}"
                                                 th:text="${bb.floor}">0</span></span>
                                        <span th:if="${ind.index==1}" style="margin-right: 30px; font-size: 16px;">入住人数:<span
                                                id="floorBedNum1" th:if="${ind.index==1}" th:text="${bb.floor}">0</span></span>
                                        <span th:if="${ind.index==2}" style="margin-right: 30px; font-size: 16px;">空闲床位:<span
                                                id="floorBedNum2" th:if="${ind.index==2}" th:text="${bb.floor}">0</span></span>
                                      </span>
                    </td>
                </tr>
                </tbody>
            </table>
            <div id="roomList">
                <div class="room-list">
                    <div class="room-item">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</html>